<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>

<%@include file="/common/head.jsp" %>

<c:set var="module" value="user"/>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">

                    <%--<form role="form" class="form-inline" id="query-form" method="post" action="${ctx }/admin/user/list" >--%>
                        <%--<!-- 查询开始 -->--%>
                        <%--<input type="hidden" name="type" value="${type }" />--%>
                        <%--<input type="hidden" name="fromType" value="${fromType }" />--%>
                        <%--<div class="form-group">--%>
                            <%--<label for="query-user" class="sr-only">用户</label>--%>
                            <%--<input type="text" placeholder="用户名、昵称或手机" name="searchTerm" value="${query.searchTerm }" class="form-control"/>--%>
                        <%--</div>--%>
                        <%--<div class="form-group">--%>
                            <%--<button class="btn btn-primary form-control" type="submit"><i class="fa fa-check"></i>&nbsp;查询</button>--%>
                        <%--</div>--%>
                        <%--<!-- 查询结束 -->--%>
                    <%--</form>--%>
                    <table id="table" data-toggle="table" data-height="400" data-click-to-select="true" data-mobile-responsive="true">
                        <thead>
                        <tr>
                            <th data-field="state" >绑定用户</th>
                            <th data-field="id">id</th>
                            <th data-field="type">类型</th>
                            <th data-field="username">用户名</th>
                            <th data-field="nickName">昵称</th>
                            <th data-field="email">邮箱</th>
                        </tr>
                        </thead>
                        <tbody>
                        <form role="form" class="form-inline" id="UserId-form" method="post" action="${ctx }/admin/employee/getUserId">
                        <c:forEach items="${list }" var="n" varStatus="idx">
                            <tr data-index="${idx.index }">

                                <td class="bs-checkbox">
                                    <input name="btSelectItem" type="radio" value="${n.username }">
                                </td>
                                    <input type="hidden" value="${n.id}" name="id" id="id">
                                <td style="">${n.id }</td>
                                <td style="">${enum:list('UserType', n.type)}</td>
                                <td style="">${n.username }</td>
                                <td style="">${n.nickName }</td>
                                <td style="">${n.email }</td>
                            </tr>
                        </c:forEach>
                        </form>
                        </tbody>
                    </table>

                    <div class="row">
                        <div class="col-sm-6">
                            <div class="dataTables_info" id="DataTables_Table_0_info"
                                 role="alert" aria-live="polite" aria-relevant="all">显示第 ${(page.page - 1) * page.pageSize  + 1}
                                到第 ${(page.page) * page.pageSize} 项，共 ${page.totalRecords } 项</div>
                        </div>
                        <div class="col-sm-6">
                            <div class="dataTables_paginate paging_simple_numbers"
                                 id="DataTables_Table_0_paginate">
                                <ul class="pagination" id="pagination">
                                </ul>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>

<%@include file="/common/foot.jsp" %>

</body>
</html>